package nccloud.pubimpl.so.delivery.event.head;

import java.util.Map;

import nc.itf.scmpub.reference.uap.bd.customer.CustomerPubService;
import nc.vo.so.m4331.entity.DeliveryVO;
import nc.vo.so.pub.keyvalue.VOKeyValue;
import nccloud.dto.scmpub.pub.context.BillCardHeadEditEvent;
import nccloud.dto.scmpub.pub.event.rule.IHeadAfterRule;

public class CustomerAfterRule extends Object implements IHeadAfterRule<DeliveryVO> {
	public DeliveryVO afterEdit(DeliveryVO billvo, BillCardHeadEditEvent event, Map userobject) {
		VOKeyValue vOKeyValue = new VOKeyValue(billvo);
		String custvid = vOKeyValue.getHeadStringValue("vdef21");
		Map<String, String> custs = CustomerPubService.queryCustomerOidsByVids(new String[] {custvid});
		vOKeyValue.setHeadValue("vdef20", custs.get(custvid));
		return billvo;
	}
}
